<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<!--只在模块名下面有效 -->
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui"%>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>合作对象</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div>
			<div id="ligergridDB" class="sq-grid"></div>
		</div>
	</div>

	<script type="text/javascript">
	var groupId = ${groupId};
	var splTypCd = ${splTypCd};
	$(function () {
		//initGridDB();//初始化待办列表
        gridDB = $("#ligergridDB").ligerGrid({
            url: '<%=path%>/grpcfg/splgrpprjbizview/searchSplGrpMembDevAmtRank.do?groupId='+groupId,
            method : 'get',
            parms:{
                groupId:groupId,
                splTypCd:splTypCd
            },
            columns: [
                { display: '合作对象', name: 'compNm', minWidth: 150 , enabledSort:false,
                    totalSummary: {
                        type: 'sum',
                        render : function(suminf, column, cell){
                            return '总计';
                        }
                    }
				},
                { display: '投放额', name: 'totalDevAmt', minWidth: 150 , enabledSort:false,
                    render: function (rowdata, index, value) {
                        return '¥'+FormatMoney(rowdata.totalDevAmt / 100);
                    },
                    totalSummary: {
                        type: 'sum',
                        render : function(suminf, column, cell){
                            return '¥'+FormatMoney(suminf.sum / 100);
                        }
                    }
				},
                { display: '投放占比', name: '', minWidth: 150 , enabledSort:false,
					render:function(rowdata,index,value){
                        if (!rowdata.totalDevAmt){
                            return ;
                        }
                        return percentNum(rowdata.totalDevAmt,rowdata.sumDevAmt);
                    }
				}
            ],
            //pageSize:10,
            //pageSizeOptions: [10, 20, 30, 40, 50, 100],//按照自己的喜好选择不同的页面显示条数
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-30,
            checkbox:false,
            rownumbers:true,
            usePager: false
        });

        gridDB.setHeight(100);
        gridDB.options.isSingleCheck=true;
	});
    function percentNum(num,num2) {
        return (Math.round(num / num2 * 10000) / 100.00 + "%"); //小数点后两位百分比
    }
</script>
</body>
</html>
